package com.leruan.aasimp.service.impl;

import java.util.List;
import java.util.Map;

import com.leruan.aasimp.dao.CarInsuranceDao;
import com.leruan.aasimp.entity.CarBedding;
import com.leruan.aasimp.entity.CarInsurance;
import com.leruan.aasimp.service.BoardService;
import com.leruan.aasimp.service.InsuranceService;

public class CarInsuranceServiceImpl implements InsuranceService {
	private CarInsuranceDao carInsuranceDao;

	public CarInsuranceDao getCarInsuranceDao() {
		return carInsuranceDao;
	}

	public void setCarInsuranceDao(CarInsuranceDao carInsuranceDao) {
		this.carInsuranceDao = carInsuranceDao;
	}

	public List<CarInsurance> findall(){
		return carInsuranceDao.findAll();
	}

	public void addTc(CarInsurance carInsurance) {
		carInsuranceDao.add(carInsurance);
		
	}

	public CarInsurance findById(long findById) {
		return carInsuranceDao.findById(findById);
	}

	public void update(CarInsurance carInsurance) {
		carInsuranceDao.update(carInsurance);
		
	}

	public void delete(CarInsurance carInsurance) {
		carInsuranceDao.delete(carInsurance);
		
	}

	public List<CarInsurance> getByList(Map<String, String> map, int pageNo) {
		return carInsuranceDao.getByList(map, pageNo);
	}

	public Long getTotal(Map<String, String> map) {
		return carInsuranceDao.getTotal(map);
	}

	public CarInsurance findByUserId(long parseLong) {
		return carInsuranceDao.findByUserId(parseLong);
		
	}

	public CarInsurance findBy(String id, String parseLong) {
		return carInsuranceDao.findByUserId(id,parseLong);
	}
}
